<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header('响应时间监控')"></head>
<body class="gray-bg">
<div class="container-div">
    <div class="col-sm-12 search-collapse">

        <div class="select-list">
            <ul>
                <li style="color: red;">
                    系统响应时间超过<span th:text="${CONDITION_TIME}"></span>毫秒时，后台方法将被记录！
                </li>
            </ul>
        </div>

    </div>

    <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
        <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()"
           shiro:hasPermission="system:costTime:remove">
            <i class="fa fa-remove"></i> 删除
        </a>
        <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="system:costTime:remove">
            <i class="fa fa-remove"></i> 清空
        </a>
    </div>

    <div class="col-sm-12 select-table table-striped">
        <table id="bootstrap-table" data-mobile-responsive="true"></table>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var removeFlag = [[${@permission.hasPermi('system:costTime:remove')}]];
    var prefix = ctx + "system/costTime";

    $(function () {
        var options = {
            url: prefix + "/list",
            removeUrl: prefix + "/remove",
            cleanUrl: prefix + "/clean",
            modalName: "系统响应时间统计记录",
            search: false,
            showExport: false,
            columns: [{
                    checkbox: true
                },
                {field: 'id', title: '主键'},
                {field: 'className', title: '类名'},
                {field: 'methodName', title: '方法名'},
                {field: 'spendTime', title: '消耗的时间'},
                {field: 'id', title: '时间', formatter: function (value, row, index) {
                        return convertTimeUuidToDateStr(value);
                    }
                },
                {title: '操作', align: 'center',formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });

</script>
</body>
</html>